<?php

/**
 * descript:行为测试
 * User: blue
 * Date: 2018/4/28 9:23
 */

namespace app\admin\behavior;

use think\Db;
use think\facade\View;

class Conf
{
    public function run($params){
        //配置文件分配
        $data=Db::table('think_config')->field('content')->find(1);
        $confData=json_decode($data['content'],true);
        //存到全局数据中
        v('conf',$confData);
        //分配到视图文件
        View::share(['conf'=>$confData]);
    }
}